<%@ page language="java" pageEncoding="utf-8"%>




<%@page import="entitybean.oc_user_name.EntityBeanOc_User_Name"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>【北极海洋生态系统信息共享平台欢迎您！】</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function submit_me()
{
	var password=document.getElementById("password").value;
 	var newpassword=document.getElementById("newpassword").value;
	var re_newpassword=document.getElementById("re_newpassword").value;
	var yzm=document.getElementById("yzm").value;
	if(password=="")
	{
		window.alert("原始密码 为空!");
		return false;
	}
	if(newpassword=="")
	{
		window.alert("新密码 为空!");
		return false;
	}
	if(re_newpassword=="")
	{
		window.alert("新密码确认 为空!");
		return false;
	}
	if(newpassword!=re_newpassword){
		window.alert("你两次输入的密码不一样!");
		return false;
	}
	if(yzm=="")
	{
		window.alert("验证码 为空!");
		return false;
	}
	if(newpassword!=re_newpassword)
	{
			window.alert("新密码确认 和 新密码 不一致!");
		
		}
	document.getElementById("form1").action="<%=request.getContextPath()%>/updatepassword.do?method=updatepassword";
	document.getElementById("form1").submit();
	
	
}


</script>


</head>
<%
/*System.out.println("显示页面");
EntityBeanOc_User_Name e =(EntityBeanOc_User_Name)request.getSession().getAttribute("Ocean_User");
if(e!=null)
{
System.out.println("e.get_id="+e.getId());
}
else
{
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			System.out.println("e.get_id="+basePath);
response.sendRedirect(basePath);
return;
}*/
 %>


<body>


<%@ include file="top.jsp"%>


<div class="comparebox">
  <div class="wzz"><a href="index.jsp">首页</a>&gt;<a href="manager.jsp">账户管理</a></div>
  <div class="xzzbox">
    <div class="xztitle"><img src="images/zh.jpg" alt="" /></div>
    <div class="new_xx">
     <div class="nei">
     <form id="form1" name="form1" action="" method="post">
<table width="60%" border="0" align="center" cellpadding="1" cellspacing="5">
  <tr>
    <td width="28%" align="right">原始密码</td>
    <td colspan="2"><input name="password" type="password" class="txtpassword" id="password" size="35" /></td>
  </tr>
  <tr>
    <td align="right">新密码</td>
    <td colspan="2"><input name="newpassword" type="password" class="txtpassword" id="newpassword" size="35" /></td>
  </tr>
  <tr>
    <td align="right">新密码确认</td>
    <td colspan="2"><input name="re_newpassword" type="password" class="txtpassword" id="re_newpassword" size="35" /></td>
  </tr>
  <tr>
    <td align="right">验证码</td>
    <td width="10%"><input name="yzm" type="text" class="txtpassword" id="yzm" size="15" />
    </td>
    <td width="60%"><img src="<%=request.getContextPath()%>/CheckNum.jsp" width="50" height="20" id="checkImg" align="left" onclick="this.src='<%=request.getContextPath()%>/CheckNum.jsp?abc='+Math.random()" style="cursor:hand"/></td>

  </tr>
  <tr>
    <td>&nbsp;</td>
    <td colspan="2"><img src="images/compare.jpg" onclick="submit_me()"/> <%
   String error_msg=(String)request.getAttribute("error_msg");
   if(error_msg!=null)
   {
   		out.write(error_msg);
   }
    %></td>
  </tr>
</table>
	</form>
     </div>
    
    
    </div>
    
    <div class="clear"></div>
  </div>
</div>
<%@ include file="footer.jsp" %>
</body>
</html>
